#ifndef _MSGQUEUE_H_
#define _MSGQUEUE_H_

#include "stdafx.h"


class CMsgQueue : public CAutoLock
{
public:
	CMsgQueue(void);
	virtual ~CMsgQueue(void);
public:
	void	Push(IMsg* pMessage);
	bool	GetNext(IMsg** ppMessage);
	bool	IsEmpty();
	void	Clear();
	void	PostSem();
	void	WaitSem();
public:
	std::queue<IMsg*>	m_Queue;
	CSemHandle			m_sem;
};
#endif

